next
Round
Technologies
Experiences
Contribute
Login
next
Round
Technologies
Experiences
Contribute
Login
Question Loading...
Dependency Injection
1. How does NestJS resolve constructor injection at runtime?
Level: Expert | Frequency: High
2. When do you need @Inject(TOKEN) vs plain constructor injection in NestJS?
Level: Expert | Frequency: High
3. What is ModuleRef in NestJS and when would you use it?
Level: Expert | Frequency: High
4. What is the difference between moduleRef.get() and moduleRef.resolve() in NestJS?
Level: Expert | Frequency: High
5. What does @Optional() decorator do in NestJS?
Level: Expert | Frequency: High
6. What is Inversion of Control (IoC) and how does NestJS implement it?
Level: Expert | Frequency: High
7. What is the difference between Dependency Injection (DI) and Inversion of Control (IoC)?
Level: Expert | Frequency: High
8. What role does reflect-metadata play in NestJS DI?
Level: Expert | Frequency: High
9. What is a DI token and what types can be used as tokens in NestJS?
Level: Expert | Frequency: High
10. What are the three provider scopes in NestJS and when is each appropriate?
Level: Expert | Frequency: High
11. What is scope propagation in NestJS and why can it impact performance?
Level: Expert | Frequency: High
12. How do you inject the raw HTTP request object inside a REQUEST-scoped provider in NestJS?
Level: Expert | Frequency: High
13. How does moduleRef.resolve() work with scoped providers and what is ContextIdFactory used for?
Level: Expert | Frequency: High
14. How do you pass a custom REQUEST object to a REQUEST-scoped provider for queues or CRON jobs in NestJS?
Level: Expert | Frequency: High
15. What is a circular dependency in NestJS and how does it manifest at runtime?
Level: Expert | Frequency: High
16. How does forwardRef() solve circular dependencies in NestJS and how does it work internally?
Level: Expert | Frequency: High
17. What is the correct architectural solution for circular dependencies beyond forwardRef()?
Level: Expert | Frequency: High
18. How do you detect and debug circular dependency errors in large NestJS projects?
Level: Expert | Frequency: High
19. How do you implement the Strategy pattern using NestJS DI?
Level: Expert | Frequency: High
20. What is property-based injection in NestJS and when should you use it?
Level: Expert | Frequency: High
21. How do you write a unit test for a NestJS service that has injected dependencies?
Level: Expert | Frequency: High
22. What is LazyModuleLoader in NestJS and how does it differ from standard DI?
Level: Expert | Frequency: High
23. How do you replace a provider in a NestJS test module using overrideProvider()?
Level: Expert | Frequency: High
24. What happens to REQUEST-scoped providers during WebSocket connections or microservice message handling in NestJS?
Level: Expert | Frequency: High
All Topics
Basics
Modules
Decorators
Controllers
Dependency Injection
Providers
Architecture
Request Lifecycle
Middleware
Guards
Interceptors
Pipes
Filters
Exception Handling
API Design
GraphQL
Database and ORM
Microservices
Authentication and Authorization,
Interceptors